package com.kitty.kittyredission;

import org.redisson.Redisson;
import org.redisson.api.RKeys;
import org.redisson.api.RStream;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;

import java.util.Iterator;

/**
 * @Description
 * @Author SHEN
 * @Date 2021/5/10
 */
public class RedissionTestMain {

    public static void main(String[] args) {

        Config config = new Config();
        config.useClusterServers()
                .setScanInterval(2000)
                .addNodeAddress("redis://10.13.65.178:6390","redis://10.13.65.179:6390","redis://10.13.65.180:6390");

        RedissonClient redisson = Redisson.create(config);
        RKeys keys = redisson.getKeys();
        keys.getKeys().forEach(item->{
            System.out.println(item);
        });
    }


}
